/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BUS;

import DAO.DAO;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Endlesslove
 */
public class ThamSo implements IDaTa{

    @Override
    public ResultSet Search(DTO.Idata Obj)
    {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public boolean Update(DTO.Idata Obj) 
    {
        List<String> params = new ArrayList<>();
        params.add("int:" +  ((DTO.ThamSo)Obj).SoLuongNhapToiThieu) ;//So Luong nhap  toi thieu
        params.add("int:" +  ((DTO.ThamSo)Obj).SoLuongTonToiThieuTruochiNhap);//so lung truoc hi nhap
        params.add("int:" +  ((DTO.ThamSo)Obj).SoLuongTonToiThieuSaukhiBan);// so luong sau khi ban
        params.add("int:" +  ((DTO.ThamSo)Obj).NoToiDa );//no toi da
        params.add("bit:" + ((DTO.ThamSo)Obj).ApDungQuyDinhTienThuKhongVuotQuaTienNo);//Ap dung quy dinh
        return DAO.CallProc("SuaThamSo", params, true);
    }

    @Override
    public boolean Delete(DTO.Idata Obj) 
    {
        return false;
    }

    @Override
    public void LoadData(Object table) 
    {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public boolean Insert(DTO.Idata Obj) 
    {
//        List<String> params = new ArrayList<>();
//        params.add("int:" +  param[0]) ;//masach
//        params.add("int:" +  param[1]);//tensach
//        params.add("int:" +  param[2] );//theloai
//        params.add("int:" +  param[3] );//tacgia
//        params.add("bit:" + param[4]);//soluongton
//        return DAO.CallProc("ThemThamSo", params, true);
        throw new UnsupportedOperationException();
    }

    @Override
    public String GenerateID() 
    {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
}
